package org.misalen.web.admin.controllers;

import javax.servlet.http.HttpServletRequest;

import org.misalen.annotations.ControllerApi;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "error")
@ControllerApi("错误信息")
public class ErrorController {

	@RequestMapping(value = "/400", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView error400(HttpServletRequest request) {
		return new ModelAndView("/error/400");
	}

	@RequestMapping(value = "/405", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView error405(HttpServletRequest request) {
		return new ModelAndView("/error/405");
	}

	@RequestMapping(value = "/404", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView error404(HttpServletRequest request) {
		return new ModelAndView("/error/404");
	}

	@RequestMapping(value = "/500", method = { RequestMethod.GET, RequestMethod.POST })
	public ModelAndView error500(HttpServletRequest request) {
		return new ModelAndView("/error/500");
	}

}
